function showMsg(obj) {
    var html="<div id='msg-box' style='height: 100%'>" +
        "<div  id='top' style='top:5px;background: lightgray;height: 10%;text-align: center;vertical-align: center'>" +
        "<img  class='back' src='/copy_QQ/public/images/left.png' style='float:left;width:50px;height: 50px;margin: 10px'>" +
        "<h2 style='display:inline-block ;' account='"+obj.account+"'>"+obj.nickname+"</h2>"+
        "<img class='add' src='/copy_QQ/public/images/add.png' style='float:right;width:50px;height: 50px;margin: 10px'>"+
        "</div>"+
        "<div id='main' style='height: 80%'></div>" +
        "<div id='botton' style='height: 10%' class='weui-cell' style='bottom: 10px;left: 5px;right: 5px'>" +
        "<div class='weui-cell__bd'>"+
        "<input type='text' class='weui-input content' placeholder='请输入内容'>"+
        "</div>" +
        "<div class='weui-cell__ft'>"+
        "<button type='button' class='weui-vcode-btn send'>发送</button>"+
        "</div>"+
        "</div>"+
        "</div>";
    var pageIndex = layer.open({
        type: 1,
        content: html,
        anim: 'up',
        style: 'position:fixed; left:0; top:0; width:100%; height:100%; border: none; -webkit-animation-duration: .5s; animation-duration: .5s;'
    });
    $(".send").on("click",function (e) {
        var that=this;
        webim.getProfilePortrait({
            "To_Account":[obj.account],
            "TagList":
                [
                    "Tag_Profile_IM_Image",
                    "Tag_Profile_IM_Nick"
                ]
        },function (resp){
            //console.log(resp);
            var url=resp.UserProfileItem[0].ProfileItem[0].Value;
            var nickname=resp.UserProfileItem[0].ProfileItem[1].Value;
            var content=$(that).parents("#botton").find(".content").val();
            var msg="<div><img src='"+url+"' style='width: 50px;height: 50px;'><h3>"+nickname+":</h3><p>"+content+"</p></div>";
            $("#main").append(msg);
            sendMsg({
                toid:obj.account,
                tonickname:nickname,
                text:content
            });

        },function (err) {
            console.log(err.ErrorInfo);
        });


    });
    $(".back").on("click",function (e) {

        $(this).attr("src","/copy_QQ/public/images/left-on.png");
        layer.close(pageIndex);
    });
    $(".add").on("click",function (e) {
        $(this).attr("src","/copy_QQ/public/images/add-on.png");
        var options={
          "From_Account":sessionStorage.getItem("mobile"),
          "AddFriendItem":{
              'To_Account': $(this).parents("#msg-box").find("h2").attr("account"),
              "AddSource": "AddSource_Type_Unknow",
              "AddWording": "添加好友" //加好友附言，可为空
          }
        };
        webim.applyAddFriend(options,function (resp) {
            console.log(resp);
        },function (err) {
            alert(err.ErrorInfo);
        });
    });
}